package common.utils;

import common.entity.course;
import common.entity.teacher;

//课程工具类
public  abstract class teacherUtils extends pictUtils{
    public static final String sp="_teacher_";
    public static final String parentFile="/teacher/";
    /**
     * 设置老师图片名称
     * teacher.getId() + sp+teacher.getName()+sp+teacher.getNickname()+PictType
     * @param
     */
    public static String setCoursePictName (teacher teacher, String PictType) throws Exception{
        if(!pictTypes.contains(PictType)){throw new Exception("该图片为不支持的格式:"+PictType+"\n支持的图片格式为+"+ pictTypes);}
        return teacher.getId() + sp+teacher.getName()+sp+teacher.getNickname()+PictType;
    }
    /**
     * 老师头像
     */
    public static final String PortraitsPict="pict/portraits/";
}
